package org.walkerljl.commons.dts;

/**
 * DTS Handler
 *
 * @author lijunlin
 */
public interface DtsHandler {

    /**
     * Get handler id
     *
     * @return
     */
    String getId();

    /**
     * Get handler name
     *
     * @return
     */
    String getName();

    /**
     * prepare
     *
     * @param param
     * @return
     */
    boolean prepare(Object param);

    /**
     * commit
     *
     * @param param
     * @return
     */
    Object commit(Object param);

    /**
     * commit
     *
     * @param param
     * @return
     */
    boolean rollback(Object param);
}
